<!doctype html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />









  <meta name="baidu-site-verification" content="Q7ugSRSO7V" />







  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="linux,命令,bash快捷键," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="创建快捷方式ln 源文件 目标文件  例：ln default /Users/pangmin/Documents/www/nginx-hostln -s 源文件 目标文件  例：ln -s /usr/local/etc/nginx/sites-enabled/       /Users/pangmin/Documents/www/site-default 启动 关闭 重启 nginx开启：ngin">
<meta name="keywords" content="linux,命令,bash快捷键">
<meta property="og:type" content="article">
<meta property="og:title" content="每日一个Linux命令">
<meta property="og:url" content="http://yoursite.com/linux/每日一个Linux命令/index.html">
<meta property="og:site_name" content="chimps">
<meta property="og:description" content="创建快捷方式ln 源文件 目标文件  例：ln default /Users/pangmin/Documents/www/nginx-hostln -s 源文件 目标文件  例：ln -s /usr/local/etc/nginx/sites-enabled/       /Users/pangmin/Documents/www/site-default 启动 关闭 重启 nginx开启：ngin">
<meta property="og:updated_time" content="2017-04-23T13:42:26.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="每日一个Linux命令">
<meta name="twitter:description" content="创建快捷方式ln 源文件 目标文件  例：ln default /Users/pangmin/Documents/www/nginx-hostln -s 源文件 目标文件  例：ln -s /usr/local/etc/nginx/sites-enabled/       /Users/pangmin/Documents/www/site-default 启动 关闭 重启 nginx开启：ngin">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    sidebar: {"position":"left","display":"hide","offset":12,"offset_float":0,"b2t":false,"scrollpercent":false},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":30},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/linux/每日一个Linux命令/"/>





  <title> 每日一个Linux命令 | chimps </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  





  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?dcb994042608bdb310eff950ba755ff1";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>










  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">chimps</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/linux/每日一个Linux命令/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="chimps">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="https://sfault-avatar.b0.upaiyun.com/416/326/4163260007-58a1621e63a68_huge256">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="chimps">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                每日一个Linux命令
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-04-23T21:42:26+08:00">
                2017-04-23
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/linux/" itemprop="url" rel="index">
                    <span itemprop="name">linux</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a class="cloud-tie-join-count" href="/linux/每日一个Linux命令/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count join-count" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="创建快捷方式"><a href="#创建快捷方式" class="headerlink" title="创建快捷方式"></a>创建快捷方式</h2><figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">ln 源文件 目标文件</div><div class="line">  例：ln default /Users/pangmin/Documents/www/nginx-host</div><div class="line">ln -s 源文件 目标文件</div><div class="line">  例：ln -s /usr/local/etc/nginx/sites-enabled/ </div><div class="line">      /Users/pangmin/Documents/www/site-default</div></pre></td></tr></table></figure>
<h2 id="启动-关闭-重启-nginx"><a href="#启动-关闭-重启-nginx" class="headerlink" title="启动 关闭 重启 nginx"></a>启动 关闭 重启 nginx</h2><figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">开启：nginx</div><div class="line">关闭：nginx -s stop</div><div class="line">重启：nginx -s reload</div></pre></td></tr></table></figure>
<h2 id="启动-关闭-重启-mysql"><a href="#启动-关闭-重启-mysql" class="headerlink" title="启动 关闭 重启 mysql"></a>启动 关闭 重启 mysql</h2><figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">开启：mysql.server start</div><div class="line">关闭：mysql.server stop</div><div class="line">重启：mysql.server restart</div></pre></td></tr></table></figure>
<h2 id="启动-关闭-重启-memcache"><a href="#启动-关闭-重启-memcache" class="headerlink" title="启动 关闭 重启 memcache"></a>启动 关闭 重启 memcache</h2><figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">开启：memcached -d</div><div class="line">关闭：killall memcached</div></pre></td></tr></table></figure>
<h2 id="启动-关闭-重启-php-fpm"><a href="#启动-关闭-重启-php-fpm" class="headerlink" title="启动 关闭 重启 php-fpm"></a>启动 关闭 重启 php-fpm</h2><figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">开启：php-fpm -D</div><div class="line">关闭：killall php-fpm</div></pre></td></tr></table></figure>
<h2 id="安装-卸载-homebrew"><a href="#安装-卸载-homebrew" class="headerlink" title="安装 卸载 homebrew"></a>安装 卸载 homebrew</h2><figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">安装：</div><div class="line">ruby -e &quot;$(curl -fsSkL raw.github.com/mxcl/homebrew/go)&quot;</div><div class="line">更新</div><div class="line">brew update</div><div class="line">卸载：</div><div class="line">  cd `brew --prefix`</div><div class="line">  rm -rf Cellar</div><div class="line">  brew prune</div><div class="line">  rm `git ls-files`</div><div class="line">  rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions</div><div class="line">  rm -rf .git</div><div class="line">  rm -rf ~/Library/Caches/Homebrew</div><div class="line">安装软件。</div><div class="line">  4.1、查找：brew search</div><div class="line">　　如：brew search rar</div><div class="line">  4.2、安装， 如：brew install unrar</div><div class="line">4.3、卸载， 如：brew uninstall unrar</div><div class="line">4.4、查看，如:brew list</div></pre></td></tr></table></figure>
<h2 id="修改权限："><a href="#修改权限：" class="headerlink" title="修改权限："></a>修改权限：</h2><figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">例如chmod -R 777 /home/mypackage</div></pre></td></tr></table></figure>
<h2 id="更改用户"><a href="#更改用户" class="headerlink" title="更改用户"></a>更改用户</h2><figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">例 su - pangmin</div></pre></td></tr></table></figure>
<h2 id="查看命令帮助"><a href="#查看命令帮助" class="headerlink" title="查看命令帮助"></a>查看命令帮助</h2><figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">（命令） --help</div></pre></td></tr></table></figure>
<h2 id="查看文件安装路径"><a href="#查看文件安装路径" class="headerlink" title="查看文件安装路径"></a>查看文件安装路径</h2><figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">whereis php</div></pre></td></tr></table></figure>
<h2 id="压缩解压"><a href="#压缩解压" class="headerlink" title="压缩解压"></a>压缩解压</h2><h3 id="zip格式"><a href="#zip格式" class="headerlink" title="zip格式"></a>zip格式</h3><figure class="highlight shell"><table><tr><td class="code"><pre><div class="line">zip -r myfile.zip ./*</div><div class="line">将当前目录下的所有文件和文件夹全部压缩成myfile.zip文件,－r表示递归压缩子目录下所有文件.</div><div class="line"></div><div class="line">2.unzip</div><div class="line">unzip -o -d /home/sunny myfile.zip</div><div class="line">把myfile.zip文件解压到 /home/sunny/</div><div class="line">-o:不提示的情况下覆盖文件；</div><div class="line">-d:-d /home/sunny 指明将文件解压缩到/home/sunny目录下；</div><div class="line">3.其他</div><div class="line">zip -d myfile.zip smart.txt</div><div class="line">删除压缩文件中smart.txt文件</div><div class="line">zip -m myfile.zip ./rpm_info.txt</div><div class="line">向压缩文件中myfile.zip中添加rpm_info.txt文件</div><div class="line">-------------------------------------------------------------------------------</div><div class="line">要使用 zip 来压缩文件，在 shell 提示下键入下面的命令：</div><div class="line">zip -r filename.zip filesdir</div><div class="line">在这个例子里，filename.zip 代表你创建的文件，filesdir 代表你想放置新 zip 文件的目录。-r 选项指定你想递归地（recursively）包括所有包括在 filesdir 目录中的文件。</div><div class="line">要抽取 zip 文件的内容，键入以下命令：</div><div class="line">unzip filename.zip</div><div class="line">你可以使用 zip 命令同时处理多个文件和目录，方法是将它们逐一列出，并用空格间隔：</div><div class="line">zip -r filename.zip file1 file2 file3 /usr/work/school </div><div class="line">上面的命令把 file1、file2、 file3、以及 /usr/work/school 目录的内容（假设这个目录存在）压缩起来，然后放入 filename.zip 文件中。</div></pre></td></tr></table></figure>
<h3 id="tar格式"><a href="#tar格式" class="headerlink" title="tar格式"></a>tar格式</h3><figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">　压缩</div><div class="line">　　tar –cvf jpg.tar *.jpg //将目录里所有jpg文件打包成tar.jpg</div><div class="line">　　tar –czf jpg.tar.gz *.jpg //将目录里所有jpg文件打包成jpg.tar后，并且将其用gzip压缩，生成一个gzip压缩过的包，命名为jpg.tar.gz</div><div class="line">　　tar –cjf jpg.tar.bz2 *.jpg //将目录里所有jpg文件打包成jpg.tar后，并且将其用bzip2压缩，生成一个bzip2压缩过的包，命名为jpg.tar.bz2</div><div class="line">　　tar –cZf jpg.tar.Z *.jpg //将目录里所有jpg文件打包成jpg.tar后，并且将其用compress压缩，生成一个umcompress压缩过的包，命名为jpg.tar.Z</div><div class="line">　　rar a jpg.rar *.jpg //rar格式的压缩，需要先下载rar for linux</div><div class="line">　　zip jpg.zip *.jpg //zip格式的压缩，需要先下载zip for linux</div><div class="line">　　解压</div><div class="line">　　tar –xvf file.tar //解压 tar包</div><div class="line">　　tar -xzvf file.tar.gz //解压tar.gz</div><div class="line">　　tar -xjvf file.tar.bz2 //解压 tar.bz2</div><div class="line">　　tar –xZvf file.tar.Z //解压tar.Z</div><div class="line">　　unrar e file.rar //解压rar</div><div class="line">　　unzip file.zip //解压zip</div></pre></td></tr></table></figure>
<h2 id="将命令输出保存到变量中"><a href="#将命令输出保存到变量中" class="headerlink" title="将命令输出保存到变量中"></a>将命令输出保存到变量中</h2><ul>
<li><p>`符号包含的命令执行完后，可以讲其输出结果保存到变量中</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">v=`java -version`  </div><div class="line">echo $v</div></pre></td></tr></table></figure>
</li>
<li><p>还有另一种方法，用$()将命令包起来。</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><div class="line">v=$(java -version)  </div><div class="line">echo $v</div></pre></td></tr></table></figure>
</li>
</ul>
<h2 id="bash常用快捷键"><a href="#bash常用快捷键" class="headerlink" title="bash常用快捷键"></a>bash常用快捷键</h2><blockquote>
<p><strong>ctrl+A</strong><br>把光标移动到命令行开头。如果我们输入的命令过长,想要把光标移 动到命令行开头时使用。<br><strong>ctrl+E</strong><br>把光标移动到命令行结尾。<br><strong>ctrl+C</strong><br>强制终止当前的命令。<br><strong>ctrl+L</strong><br>清屏,相当于clear命令。<br><strong>ctrl+U</strong><br>删除或剪切光标之前的命令。我输入了一行很长的命令,不用使用退 格键一个一个字符的删除,使用这个快捷键会更加方便<br><strong>ctrl+K</strong><br>删除或剪切光标之后的内容。<br><strong>ctrl+Y</strong><br>粘贴ctrl+U或ctrl+K剪切的内容。<br><strong>ctrl+R</strong><br>在历史命令中搜索,按下ctrl+R之后,就会出现搜索界面,只要输入 搜索内容,就会从历史命令中搜索。<br><strong>ctrl+D</strong><br>退出当前终端。<br><strong>ctrl+Z</strong><br>暂停,并放入后台。这个快捷键牵扯工作管理的内容,我们在系统管 理章节详细介绍。<br><strong>ctrl+S</strong><br>暂停屏幕输出。<br><strong>ctrl+Q</strong><br>恢复屏幕输出。</p>
</blockquote>
<h2 id="hash"><a href="#hash" class="headerlink" title="hash"></a>hash</h2><ul>
<li>hash：列出</li>
<li>hash -d COMMOND:删除</li>
<li>hash -r 清空</li>
</ul>
<h2 id="变量"><a href="#变量" class="headerlink" title="变量"></a>变量</h2><ul>
<li>程序：指令+数据<ul>
<li>指令：有程序文件提供</li>
<li>数据：io设备，文件，管道，变量</li>
</ul>
</li>
</ul>
<h2 id="查看Linux版本"><a href="#查看Linux版本" class="headerlink" title="查看Linux版本"></a>查看Linux版本</h2><ul>
<li>uname -a</li>
<li>cat /proc/version</li>
</ul>
<h2 id="apt-get"><a href="#apt-get" class="headerlink" title="apt-get"></a>apt-get</h2><ul>
<li><code>-y</code>参数<br>安装遇到<code>Do you want to continue? [Y/n] Abort</code>时，使用这个参数自动选择Y</li>
</ul>
<h2 id="history"><a href="#history" class="headerlink" title="history"></a>history</h2><ul>
<li>在历史中搜索：快捷键<code>Ctrl + R</code></li>
<li>清空历史命令：<code>history -c</code></li>
</ul>
<h2 id="ls"><a href="#ls" class="headerlink" title="ls"></a>ls</h2><ul>
<li><p>l:</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">drwxrwxrwx 2 chimps chimps 4096 2月   1 03:16 文档</div><div class="line">drwxrwxrwx 2 chimps chimps 4096 3月  13 20:27 下载</div><div class="line">drwxrwxrwx 2 chimps chimps 4096 2月   1 03:16 音乐</div><div class="line">drwxrwxrwx 2 chimps chimps 4096 2月   1 03:16 桌面</div></pre></td></tr></table></figure>
<ul>
<li>第一个首字母表示文件类型：<code>d</code>：directory，<code>-</code>：普通文件，<code>l</code>:link</li>
<li>第二个表示文件连接数。</li>
</ul>
</li>
<li>S：order by size</li>
<li>k：显示大小以k字节为单位</li>
<li>h：以更直观的方式查看文件大小</li>
</ul>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/linux/" rel="tag"># linux</a>
          
            <a href="/tags/命令/" rel="tag"># 命令</a>
          
            <a href="/tags/bash快捷键/" rel="tag"># bash快捷键</a>
          
        </div>
      

      
        
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/linux/进程管理/" rel="next" title="进程管理">
                <i class="fa fa-chevron-left"></i> 进程管理
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/linux/vim/" rel="prev" title="vim">
                vim <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
      <div id="cloud-tie-wrapper" class="cloud-tie-wrapper"></div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="https://sfault-avatar.b0.upaiyun.com/416/326/4163260007-58a1621e63a68_huge256"
               alt="chimps" />
          <p class="site-author-name" itemprop="name">chimps</p>
           
              <p class="site-description motion-element" itemprop="description"></p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">59</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-categories">
              <a href="/categories/index.html">
                <span class="site-state-item-count">12</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/tags/index.html">
                <span class="site-state-item-count">19</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#创建快捷方式"><span class="nav-number">1.</span> <span class="nav-text">创建快捷方式</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#启动-关闭-重启-nginx"><span class="nav-number">2.</span> <span class="nav-text">启动 关闭 重启 nginx</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#启动-关闭-重启-mysql"><span class="nav-number">3.</span> <span class="nav-text">启动 关闭 重启 mysql</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#启动-关闭-重启-memcache"><span class="nav-number">4.</span> <span class="nav-text">启动 关闭 重启 memcache</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#启动-关闭-重启-php-fpm"><span class="nav-number">5.</span> <span class="nav-text">启动 关闭 重启 php-fpm</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#安装-卸载-homebrew"><span class="nav-number">6.</span> <span class="nav-text">安装 卸载 homebrew</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#修改权限："><span class="nav-number">7.</span> <span class="nav-text">修改权限：</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#更改用户"><span class="nav-number">8.</span> <span class="nav-text">更改用户</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#查看命令帮助"><span class="nav-number">9.</span> <span class="nav-text">查看命令帮助</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#查看文件安装路径"><span class="nav-number">10.</span> <span class="nav-text">查看文件安装路径</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#压缩解压"><span class="nav-number">11.</span> <span class="nav-text">压缩解压</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#zip格式"><span class="nav-number">11.1.</span> <span class="nav-text">zip格式</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#tar格式"><span class="nav-number">11.2.</span> <span class="nav-text">tar格式</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#将命令输出保存到变量中"><span class="nav-number">12.</span> <span class="nav-text">将命令输出保存到变量中</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#bash常用快捷键"><span class="nav-number">13.</span> <span class="nav-text">bash常用快捷键</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#hash"><span class="nav-number">14.</span> <span class="nav-text">hash</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#变量"><span class="nav-number">15.</span> <span class="nav-text">变量</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#查看Linux版本"><span class="nav-number">16.</span> <span class="nav-text">查看Linux版本</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#apt-get"><span class="nav-number">17.</span> <span class="nav-text">apt-get</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#history"><span class="nav-number">18.</span> <span class="nav-text">history</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#ls"><span class="nav-number">19.</span> <span class="nav-text">ls</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">chimps</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Mist
  </a>
</div>


        

        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  








  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  


  




	





  
    
    <script>
      var cloudTieConfig = {
        url: document.location.href, 
        sourceId: "",
        productKey: "48bb30d8783d4b38ba0c95e0283238ca",
        target: "cloud-tie-wrapper"
      };
    </script>
    <script src="https://img1.ws.126.net/f2e/tie/yun/sdk/loader.js"></script>
  










  





  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  

  

  

</body>
</html>
